import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Properties;

import jsystem.JSystem;


public class Manager {
	
	public Manager(String systemPath) throws FileNotFoundException, IOException {
		Properties p = new Properties();
		p.load(new FileInputStream(new File(systemPath)));
	}

	public static HashMap<String, JSystem> loadSystemsFile(String path) throws FileNotFoundException, IOException {
		HashMap<String,JSystem> systems = new HashMap();
		
		File file = new File(path);
		File dir = file.getParentFile();
		
		Properties p = new Properties();
		p.load(new FileInputStream(file));
		for(Object systemName : p.keySet()) {
			String systemPath = p.getProperty(systemName.toString());
			systems.put(systemName.toString(), new JSystem(systemPath));
		}
		
		return systems;
	}

	public static void main(String args[]) throws FileNotFoundException, IOException {
		HashMap systems = loadSystemsFile("systems.jsystem");
	}
}
